<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<div class="box" style="text-align: left; height: auto;">
<div id="forum_question">
<?php foreach($forum_questions as $fq){?>
<table style="width: 99%;background-color: #dfdcd5" align="center" cellspacing="1" border="0" >
	<tbody style="width: 100%">
		<tr>
			<td colspan="5">
			<table width="100%" border="0" style="background-color: #f5eede">
				<tr >
					<td width="100px;" style="background: #f7e8c6">หัวข้อกระทู้</td>
					<td style="background: #f7e8c6"><?=$fq->headline?><br/><br/></td>
				</tr>
				<tr valign="top">
					<td style="background: #f7e8c6">รายละเอียด</td>
					<td style="background: #f7e8c6"><?=$fq->detail?><br/><br/><br/></td>
				</tr>
				<tr>
					<td colspan="2" align="right">เจ้าของกระทู้ :xxxxx  <?php echo " วันที่โพส : ".$fq->post_date ." จำนวนผู้อ่าน  ".$fq->count_view." ครั้ง" ?></td>
				</tr>
			</table>
			</td>
		</tr>
	</tbody>
</table>
<?php }?>
<table style="width: 99%;border: 1px solid #dfdcd5;" align="center" cellspacing="2" border="0">
	<tbody style="width: 100%">
		<?php 
		$cfq=1;
		foreach($forum_answers as $fans){
			$style =""; if($cfq%2==0){$style = "background-color: #f7fbff;height: 30px;";}else{$style = "background-color: #ffffff;height: 30px;";} 
			?>
			<tr valign="top" style="<?=$style?>">
			<?php 
			echo "<td width=\"170px;\">ความคิดเห็นที่   ".$cfq++."<br/>".$fans->post_date."<br/><br/><br/></td>";
			echo "<td>".$fans->answer."</td>";
			echo "</tr>";
		 }?>
	</tbody>
</table><br/>
<?=$pagination->render()?>
<table style="background-color: black;border: 0px" cellspacing="0" cellpadding="0">
<tr><td colspan="3"><img title="Comment มาเลย!!!" src="<?php echo url::base(FALSE) ?>images/comment_gift2friendshop_table.jpg" boder="0"></td></tr>
<tr valign="top">
	<td width="200px" style="color: white;font-weight:bold; font-size: 15px;text-align: right;"><?php echo " โพสข้อความ  ::  " ?></td>
	<td align="left"><textarea rows="10" style="width: 98%"></textarea>
	</td>
	<td width="10px"></td>
</tr>
<tr valign="top">
	<td width="200px" style="color: white;font-weight:bold; font-size: 15px;text-align: right;"><?php echo " รหัสความปลอดภัย  ::  " ?></td>
	<td align="left" valign="top">
	<?php 
		echo $captcha->render(); // Shows the Captcha challenge (image/riddle/etc)
		echo "<br/>";
		echo form::input('captcha_response');
	?> 
	</td>
	<td width="10px"></td>
</tr>
<tr valign="top">
	<td width="200px" style="color: white;font-size: 15px"></td>
	<td align="right" valign="top">
		<input type="submit" value="Post" style="width: 150px;height: 30px;">
	</td>
	<td width="10px"><?php echo "<br><br>" ?></td>
</tr>
</table>
<?php echo "<br>เวลาที่ใช้ในการทำงานหน้านี้คือ  : {execution_time}"?>
</div>
</div>
